﻿using Pay.TO;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Pay.Core;
namespace Pay.DTO {
    /// <summary>
    /// token 商品
    /// </summary>
   public class token_product_dto {
        [Required]
        public long id { get; set; }
        /// <summary>
        /// 商户id
        /// </summary>
        public long merchant_id { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        [Required(ErrorMessage ="请填写商品名称")]
        public string product_name { get; set; }
        /// <summary>
        /// 销售价
        /// </summary>
        [Required(ErrorMessage = "请填写销售价")]
        public decimal price { get; set; }
        ///// <summary>
        ///// 分销价
        ///// </summary>
        //[Required(ErrorMessage = "请填写商品成交价")]
        //public decimal distribution_price { get; set; }
        /// <summary>
        /// 结算价
        /// </summary>
        [Required(ErrorMessage = "请填写结算价")]
        public decimal cost_price { get; set; }
        /// <summary>
        /// 库存
        /// </summary>
        [Required(ErrorMessage = "请填写库存")]
        public int stock { get; set; }
        /// <summary>
        /// 分类id
        /// </summary>
        [Required(ErrorMessage = "请选择分类")]
        public long category_id { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>
        public string category_name { get; set; }
        /// <summary>
        /// 一级分类id
        /// </summary>
        public long parent_category_id { get; set; }
        /// <summary>
        /// 一级分类名称
        /// </summary>
        public string parent_category_name { get; set; }
        /// <summary>
        /// 邮费
        /// </summary>
        [Required(ErrorMessage = "请填写邮费")]
        public decimal postage { get; set; }
        /// <summary>
        /// 分享商品的文案
        /// </summary>
        //[Required(ErrorMessage = "请填写分享商品的文案")]
        public string product_copy_writing { get; set; }
        /// <summary>
        /// 商品图片
        /// </summary>
        [Required(ErrorMessage = "请上传商品图片")]
        public List<string> product_imgs { get; set; }
        /// <summary>
        /// 商品详情
        /// </summary>
        [Required(ErrorMessage = "请上传商品详情图片")]
        public List<string> procuct_desc_imgs { get; set; }
        /// <summary>
        /// 状态 1 立即上架 2 放入库存
        /// </summary>
        [Required(ErrorMessage = "请选择商品状态")]
        public int status { get; set; }
    }


    public class token_product_manage_dto {
        /// <summary>
        /// 产品Id
        /// </summary>
        public long product_id { get; set; }
        /// <summary>
        /// 分销产品
        /// </summary>
        public long distribution_product_id { get; set; }
        /// <summary>
        /// 是否是自营商品
        /// </summary>
        public bool is_proprietary { get; set; }
        /// <summary>
        /// 产品主图
        /// </summary>
        public string main_img_url { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 规格名称
        /// </summary>
        public List<string> sku_name_list { get; set; }
        /// <summary>
        /// 分销价
        /// </summary>
        public decimal price { get; set; }
        /// <summary>
        /// 销售数量
        /// </summary>
        public int sale_count { get; set; }
        /// <summary>
        /// 库存
        /// </summary>
        public int stock { get; set; }
        /// <summary>
        /// 邮费
        /// </summary>
        public decimal freight { get; set; }
        /// <summary>
        /// 分销金额（用于计算佣金）
        /// </summary>
        public decimal distribution_price { get; set; }
        /// <summary>
        /// 分销产品状态
        /// </summary>
        public EDistributionProductStatus status { get; set; }
        /// <summary>
        /// 审核状态
        /// </summary>
        public AuditStatus audit_status { get; set; }
        /// <summary>
        /// 是否app发布
        /// </summary>
        public bool is_app { get; set; }
        /// <summary>
        /// 审核原因
        /// </summary>
        public string audit_reason { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public long create_time_value { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
    }
}
